package cn.mandifal.search.controller;

import cn.mandifal.search.service.SearchService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 检索控制层
 * @author shun
 */
@RestController
@RequestMapping("/searchController")
public class SearchController {
    @Reference
    private SearchService searchService;
    /**
     * 检索
     * @param searchMap 检索实体
     * @return 返回 map 集合
     */
    @RequestMapping("/search")
    public Map search(@RequestBody Map searchMap){
        return searchService.search(searchMap);
    }
}
